# Code options
#----------------------------------------------------------

# Comp mode selection
#----------------------------------------------------------
COMPMODE = "optimised"
COMPMODE = "debug"

# System selection
#----------------------------------------------------------
include Makeopt.intel.green

# Compilation
#----------------------------------------------------------
OPTIONS         = $(OPT)
EXEC            = ic_gen_low_mem
OBJS            = comp_disp.o c_read_routines.o cosmology.o param_read.o disp_calc.o arj_phases.o vrs_phases.o


comp_disp.x: comp_disp.o c_read_routines.o cosmology.o param_read.o disp_calc.o arj_phases.o vrs_phases.o 
	$(FC) $(FOPT) $(INC) $(MOD) $(OPTIONS) $(LIB) $(OBJS) $(MOD) $(RUN) *.o -o $(EXEC)
comp_disp.o:  comp_disp.f
	$(FC) $(FOPT) $(INC) $(MOD) $(OPTIONS)  -c comp_disp.f
cosmology.o:  cosmology.f
	$(FC) $(FOPT) $(INC) $(MOD) $(OPTIONS)  -c cosmology.f
param_read.o:  param_read.f
	$(FC) $(FOPT) $(INC) $(MOD) $(OPTIONS)  -c param_read.f
disp_calc.o:  disp_calc.f
	$(FC) $(FOPT) $(INC) $(MOD) $(OPTIONS)  -c disp_calc.f
c_read_routines.o: c_read_routines.c
	$(CC) $(COPT) $(INC) $(MOD) $(OPTIONS) -c c_read_routines.c
arj_phases.o: arj_phases.c
	$(CC) $(COPT) $(INC) $(MOD) $(OPTIONS) -c arj_phases.c
vrs_phases.o : vrs_phases.c
	$(CC) $(COPT) $(INC) $(MOD) $(OPTIONS) -c vrs_phases.c
clean:
	\rm *.o $(EXEC)


